package com.lz.ccjdemo.act;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

import com.lz.ccjdemo.R;

public class IntentDataActivity extends Activity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_intent_data);
        TextView tvContent = findViewById(R.id.tv_content);
        String params = getIntent().getStringExtra("tag_params");
        tvContent.setText("上个页面带过的参数：" + params);
    }

    public void clickGoBack(View view) {
        Intent intent = getIntent();
        intent.putExtra("tag", "123");
        setResult(RESULT_OK, intent);
        finish();
    }
}
